package com.hz.springboot01.service.impl;

import com.hz.springboot01.dao.ProviderMapper;
import com.hz.springboot01.service.ProviderService;
import com.hz.springboot01.util.ResultJSON;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;


@Service
public class ProviderServiceImpl implements ProviderService {
    @Resource
    private ProviderMapper providerMapper;


    @Override
    @Transactional //添加事务
    public ResultJSON findProviderById(Integer pid) {
//    int i = 1/0;
        return ResultJSON.success(providerMapper.findProviderById(pid)) ;
    }



}
